package com.zte.claa.inficombo.csa.app.service.gprscat1.bean;

public class GPRSMsgHead {
	public static final short GPRSCAT1_UP_INDEX = 0x00;
	public static final short GPRSCAT1_UP_ALARM = 0x01;
	public static final short GPRSCAT1_DW_CMDREQ = 0x02;
	public static final short GPRSCAT1_UP_CMDRSP = 0x03;
	public static final short GPRSCAT1_DW_UPGPREREQ = 0x04;
	public static final short GPRSCAT1_UP_UPGDATAREQ = 0x05;
	public static final short GPRSCAT1_DW_UPGDATARSP = 0x06;
	public static final short GPRSCAT1_UP_UPGPROG = 0x07;
	public static final short GPRSCAT1_UP_HBREQ = 0x08;
	public static final short GPRSCAT1_DW_HBRSP = 0x08;
	public static final short GPRSCAT1_UP_REGREQ  = 0x09;
	public static final short GPRSCAT1_DW_REGRSP  = 0x09;
	public static final short GPRSCAT1_INVALID_TYPE  = 0xFF;
	
	private int msgtype = GPRSCAT1_INVALID_TYPE;
	private String deveui = "";
	private String imei = "";
	private int crccode = 0;
	
	/**
	 * 头部字节数（固定5个字节）
	 * @return
	 */
	public static int getHeadSize(){
		return 9;
	}
	
	public GPRSMsgHead(){
		
	}
	
	public int getMsgtype() {
		return msgtype;
	}

	public void setMsgtype(int msgtype) {
		this.msgtype = msgtype;
	}

	public String getDeveui() {
		return deveui;
	}

	public void setDeveui(String deveui) {
		this.deveui = deveui;
	}
	
	public String getImei() {
		return imei;
	}

	public void setImei(String imei) {
		this.imei = imei;
	}

	public int getCrccode() {
		return crccode;
	}

	public void setCrccode(int crccode) {
		this.crccode = crccode;
	}

	public String toString(){
		StringBuilder sb = new StringBuilder();
		sb.append("msgtype=").append(this.msgtype).append(";\n");
		sb.append("deveui=").append(this.deveui).append(";\n");
		sb.append("imei=").append(this.imei).append(";\n");
		sb.append("crccode=").append(this.crccode).append(".");
		return sb.toString();
	}
}
